<?php
$shop = new Shop();
$user = new User();
$shop->checkUser();//检查用户合法性，防止攻击
$error = '';

if(isset($_POST['password_submit'])){
	if($user->checkUserPwd($_POST['old_pwd'])){
		if($user->updateUserPwd($_POST['r_pwd']))echo "<script type='text/javascript'>alert('修改成功');</script>";
	}else{
		$error = '<span class="error_text error_1">原始密码错误</span>';
	}
}


?>